package com.ssy.lingxi.product.repository.customer;

import com.ssy.lingxi.product.entity.customer.CustomerAttributeGroup;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 属性组持久化层
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/6/23
 */
public interface CustomerAttributeGroupRepository extends JpaRepository<CustomerAttributeGroup,Long>, JpaSpecificationExecutor<CustomerAttributeGroup> {

    CustomerAttributeGroup findFirstByMemberIdAndMemberRoleIdAndName(Long memberId, Long memberRoleId, String name);

    List<CustomerAttributeGroup> findByMemberIdAndMemberRoleId(Long memberId, Long memberRoleId);
}
